From: Ian Jackson Date: Thu, 24 Jun 2010 11:45:32 +0000 (+0100) Subject: ocaml: remove bogus /dev/xen/ev[en]tchn X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11874^2~3 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=d5da15306fbff357726d6c8ba0925a7aca1bbb31;p=xen.git ocaml: remove bogus /dev/xen/ev[en]tchn Oxenstored should not try to create the evtchn device, as it: * creates the wrong name (/dev/xen/eventchn rather than evtchn) * uses a hard-coded minor number, even though this dynamically depends on what other misc devices are in the kernel Remove all this code and just rely on the system to create the device. Signed-off-by: Jeremy Fitzhardinge --- diff --git a/tools/ocaml/libs/eventchn/eventchn_stubs.c b/tools/ocaml/libs/eventchn/eventchn_stubs.c index 210aa30afa..e5d1591188 100644 --- a/tools/ocaml/libs/eventchn/eventchn_stubs.c +++ b/tools/ocaml/libs/eventchn/eventchn_stubs.c @@ -34,10 +34,7 @@ #include #include -#define EVENTCHN_PATH "/dev/xen/eventchn" - -static int eventchn_major = 10; -static int eventchn_minor = 61; +#define EVENTCHN_PATH "/dev/xen/evtchn" static int do_ioctl(int handle, int cmd, void *arg) { @@ -56,15 +53,7 @@ static int do_write_port(int handle, evtchn_port_t port) int eventchn_do_open(void) { - int fd; - - fd = open(EVENTCHN_PATH, O_RDWR); - if (fd == -1 && errno == ENOENT) { - mkdir("/dev/xen", 0640); - mknod(EVENTCHN_PATH, S_IFCHR | 0640, makedev(eventchn_major, eventchn_minor)); - fd = open(EVENTCHN_PATH, O_RDWR); - } - return fd; + return open(EVENTCHN_PATH, O_RDWR); } CAMLprim value stub_eventchn_init(value unit)